import realEstate from '../newList/real-estate.vue'
import transfer from '../newList/transfer.vue'
import thirdParty from '../newList/third-party.vue'
import { getDict } from '~/utils'
export default {
    name: "index",
    data() {
        return {
            activeName: 'first',
            cardTypes: [],
            cardType: '10'
        }
    },
    methods: {
        handleClick(tab, event) {
            /*if (tab.index === '0') {
                tab.$children[0].getListData('10');
            } else if (tab.index === '1') {
                tab.$children[0].getListData('20');
            } else {
                tab.$children[0].getListData('30');
            }*/
        }
    },
    components: {
        realEstate,
        transfer,
        thirdParty
    },
    mounted() {
        this.cardTypes = getDict('real_estate_card_type')
        this.cardType = sessionStorage.getItem("cardType")
    },
    watch: {
        cardType() {
            if (this.cardType === '20') {
                this.activeName = 'second'
            } else if (this.cardType === '30') {
                this.activeName = 'third'
            } else {
                this.activeName = 'first'
            }
        }
    }
}
